
package com.sci;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;

import com.example.floatview.R;


/** DemoActivity.java: ----- 2018-6-15 下午5:10:54 */
public class MainActivity extends Activity
{
	
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		
		setContentView(R.layout.main_layout);
	}
	
	// 显示悬浮窗
	public void Show(View view)
	{
		FloatService.ShowFloat(this);
	}
	
	// 隐藏悬浮窗
	public void Hide(View view)
	{
		FloatService.HideFloat();
	}
	
	public void finish()
	{
		FloatService.HideFloat();	// 若不调用，Activity结束时依然显示悬浮窗
		super.finish();
	}
}
